#include "GameDLL.h"

extern IApplication* EntryApplication();

int APIENTRY wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int) {

    auto app = EntryApplication();

    app->SetupPerGameSettings();

    app->PreInitialize();

    app->Initialize();

    MSG msg{ 0 };
    while (msg.message != WM_QUIT) {
        if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
        else {
            app->Update();
        }
    }

    return 0;
}

